package com.woniu.smallmedical.mapper;

import com.woniu.smallmedical.entity.Inventory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InventoryMapper {



    //分页查所有药
    List<Inventory> selectAll(@Param("pageIndex") Integer pageIndex,
                              @Param("pageSize") Integer pageSize);
    //查询所有条数
    Integer selectcount();

    //加入库存
    void inserInventory(Integer inid,String number,String name,String prescription,String medicinespecs,String factory,Integer count,Double purchaseamount,Double retailamount);
    //通过id查
    List<Inventory> selectByIds(String name,@Param("pageIndex") Integer pageIndex,
                                @Param("pageSize") Integer pageSize);

    void updeate(Integer count, Double purchase, Double retail, Integer smid);

    //查询所有名字
    List<Inventory> selectName();
    //修改个数通过名字
      void updatecount(String name,Integer count);

    //修改个数通过采购
    void updatepurchase(String name,Double purchaseamount);

    //修改个数通过销售
    void updateretail(String name,Double retailamount);
    //查个数通过名字
    Integer selectretail(String name);
    //查个数通过名字
    Double selectInventorypurchase(String name);
    //查个数通过名字
    Double selectInventoryretail(String name);


    //查询所有条数
    Inventory selectbyinid(Integer inid);
    //通过名字查询id
    Integer selectbynickneame(String name);
    List<Inventory> queryAll(@Param("name") String name);

}
